<?php
/**
 * @package		Joomla.Administrator
 * @subpackage	com_congregation
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
?>
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == 'province.cancel' || document.formvalidator.isValid(document.id('province-form'))) {
			<?php echo $this->form->getField('p_info')->save(); ?>
			Joomla.submitform(task, document.getElementById('province-form'));
		}
		else {
			alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
		}
	}
</script>

<?php defined('_JEXEC') or die('Restricted access'); ?>
<form action="<?php echo JRoute::_('index.php?option=com_congregation&view=province&layout=edit&p_id='.(int) $this->item->p_id); ?>" method="post" name="adminForm"  id="province-form" class="form-validate">

	<div class="width-60 fltlft">
		<fieldset class="adminform">
			<legend><?php echo JText::_('Details') ?></legend>
			<ul class="adminformlist">
				<li><?php echo $this->form->getLabel('p_name'); ?>
				<?php echo $this->form->getInput('p_name'); ?></li>

				<li><?php echo $this->form->getLabel('ordering'); ?>
				<?php echo $this->form->getInput('ordering'); ?></li>


			</ul>

			<div>
				<?php echo $this->form->getLabel('p_info'); ?>
				<div class="clr"></div>
				<?php echo $this->form->getInput('p_info'); ?>
			</div>
		</fieldset>
	</div>

	<div class="clr"></div>

		<input type="hidden" name="task" value="" />
		<?php echo JHtml::_('form.token'); ?>
</form>

